package com.jiang.专题.双指针.Q392;

/**
 * @author Jiang
 * @version 1.0
 */
class Solution {
    public boolean isSubsequence(String s, String t) {
        int i = 0, j = 0;
        while (i < s.length() && j < t.length()) {
            if (s.charAt(i) == t.charAt(j)) {
                i++;
            }
            j++;
        }
        if (i == s.length()) return true;
        return false;
    }
}
